#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <process.h>
#include <conio.h>

void main()
{
	char *getp,*pathp;
	int p;
	clrscr();
	getp=getenv("PATH");
	puts(getp);
	pathp=(char *)malloc(strlen(getp)+20);
	strcpy(pathp,getp);
	//strcat(pathp,"PATH=");
	strcat(pathp,";D:\\SOFTWARE");
	p=putenv(pathp);
	getp=getenv("PATH");
	if(!p) {
		printf("OK,the path has set.\n");
		puts(getp);
		exit(1);
		}
	printf("Sorry,the path set error.\n");
}